import request from "@/utils/request";

// 获取模型列表
export function getModelList(query) {
  return request({
    url: "/eisEvaluationModel/list",
    method: "get",
    params: query,
  });
}

// 评估计算执行，任务列表
export function getTaskList(query) {
  return request({
    url: "/eisEvaluationTask/list",
    method: "get",
    params: query,
  });
}

// 评估计算执行，任务列表删除
export function getTaskListDelete(query) {
  return request({
    url: "/eisEvaluationTask/delete",
    method: "delete",
    params: query,
  });
}

//评估计算执行，新增任务
export function getTaskAdd(data) {
  return request({
    url: "/eisEvaluationTask/add",
    method: "post",
    data: data,
  });
}

//评估计算执行，可编辑表格数据
export function getTaskModelNodeList(query) {
  return request({
    url: "/eisEvaluationTask/getTaskModelNodeList",
    method: "get",
    params: query,
  });
}

export function getPretreatmentList(query) {
  return request({
    url: "/eisEvaluationModelNode/getModelNodeList",
    method: "get",
    params: query,
  });
}
// 模型导入
export function importModel(query) {
  return request({
    url: "/eisEvaluationModelNode/getModelByStatus",
    method: "get",
    params: query,
  });
}
// 计算
export function modelCalc(query) {
  return request({
    url: "/eisEvaluationModelNode/computeValue",
    method: "get",
    params: query,
  });
}
// 计算zqz
export function computeValue(query) {
  return request({
    url: "/eisEvaluationTask/computeValue",
    method: "get",
    params: query,
  });
}

// 树形结果查询
export function getTreeData(query) {
  return request({
    url: "/eisEvaluationModelNode/selectTreeByCode",
    method: "get",
    params: query,
  });
}
// 树形结果查询zqz
export function selectTreeByCode(query) {
  return request({
    url: "eisEvaluationTask/selectTreeByCode",
    method: "get",
    params: query,
  });
}

// 评估报告导出
export function wordExport(data) {
  return request({
    url: "/eisEvaluationModelHisdetail/wordExport",
    method: "get",
    params: data,
  });
}



// 导出表格
export function exportTabel(data) {
  return request({
    url: "/eisEvaluationModelNode/exportXls",
    method: "post",
    responseType: "blob",
    params: data,
  });
}
// 导出表格zqz
export function exportXls(data) {
  return request({
    url: "/eisEvaluationTask/exportXls",
    method: "post",
    responseType: "blob",
    params: data,
  });
}
// 导入表格
export function importTabel(data) {
  return request({
    url: "/eisEvaluationTask/importExcel",
    method: "post",
    "Content-Type": "multipart/form-data",
    data,
  });
}


// 动态接引导入表格
export function importJsonData(data,time) {
  return request({
    url: "/eisEvaluationTask/importJsonData?startTime="+time.startTime+'&endTime='+ time.endTime,
    method: "post",
    "Content-Type": "multipart/form-data",
    data,
  });
}

// 暂存ZQZ
export function tempEditzqz(data) {
  return request({
    url: "/eisEvaluationTask/tempEdit",
    method: "post",
    data,
  });
}

// 暂存
export function tempEdit(data) {
  return request({
    url: "/eisEvaluationModelNode/tempEdit",
    method: "post",
    data,
  });
}

// 保存
export function saveResult(data) {
  return request({
    url: "/eisEvaluationTask/saveResult",
    method: "post",
    data,
  });
}
// chart0折现图
export function calcValueList(query) {
  return request({
    url: "/eisEvaluationModelHisdetail/calcValueList",
    method: "get",
    params: query,
  });
}
// chart1仪表盘
export function latestCalcValue(query) {
  return request({
    url: "/eisEvaluationModelHisdetail/latestCalcValue",
    method: "get",
    params: query,
  });
}
//历史记录回显
export function getHisTaskModelNodeList(query) {
  return request({
    url: "/eisEvaluationTask/getHisTaskModelNodeList",
    method: "get",
    params: query,
  });
}

// chart2柱状图
export function indicatorCapabilityAssessment(query) {
  return request({
    url: "/eisEvaluationModelHisdetail/indicatorCapabilityAssessment",
    method: "get",
    params: query,
  });
}
// chart3饼图
export function statisticsOnEvaluationResults(query) {
  return request({
    url: "/eisEvaluationModelHisdetail/statisticsOnEvaluationResults",
    method: "get",
    params: query,
  });
}
// 历史
export function getHistoryList(query) {
  return request({
    url: "/eisEvaluationTask/getHisRecords",
    method: "get",
    params: query,
  });
}
// 字典
export function getDictList(query) {
  return request({
    url: "/system/dict/data/list",
    method: "get",
    params: query,
  });
}

// 字典
export function getAlgsList(query) {
  return request({
    url: "/cloudiip/lab/list?search=YCL_",
    method: "get",
    params: query,
  });
}
